Generalize path to file