rewrite comment and adjust tests
refactor(parsefilepath): refactor based on expanduser in Python