def _separate_dir_and_file(path):
    """ Helper function for separating file directory and the file """
    temp = path.rfind("/")
    if temp == -1:
        return ".", path
    return path[:temp], path[temp + 1:]