Takes a path as a string and returns the parent directory of the basename.
(string) Path of file or directory.
The function is not file system aware; it does not check to see if the path or file exists.
The function is OS aware; it assumes the directory separator is \ on Windows and / on other OS.
Like the UNIX dirname command, it returns everything before the last path separator character in the string supplied.