simplify remove_dots_from_path: use lists:filter