Improve handling of FILENAME_MAX

Merged Philip Withnall requested to merge pwithnall/glib:filename_max into master

See the commit messages.

Merge request reports