portability: canonicalize_file_name -> realpath

canonicalize_file_name() is a GNU extension so let's use the portable
realpath() instead.

https://bugzilla.gnome.org/show_bug.cgi?id=710163