def remove_path_dirname(path):
        """
        Removes file paths directory if the directory is empty
        :param path: Filepath
        """
        dir_to_remove = os.path.dirname(path)
        if not os.listdir(dir_to_remove):
            shutil.rmtree(dir_to_remove)
        else:
            if len(os.listdir(dir_to_remove)) == 1:
                if os.listdir(dir_to_remove)[0].startswith('.'):
                    shutil.rmtree(dir_to_remove)