Add fileAndUp, directoryAndUp, directoriesAndUp methods