normalize a string which represents a file path