GetFileDir Function

Get the directory where the specified file is located.

The function first converts the supplied path to a full path then strips off the final
component of the path. If the path actually points to a directory, the value returned
will be the parent directory. The function does not check that the path supplied actually
exists.