Fixed getParentDirectory()