Similar to to_uri, but attempts to handle relative file paths as well.
filename into an URI, it will be prefixed by the current working directory if it is a relative path, and then
the path will be canonicalised so that it doesn't contain any './' or '../' segments.
filename should be in UTF-8 encoding.
absolute or relative file name path
newly-allocated URI string, or NULL on error. The caller must free the URI string with g_free when no longer needed.