add resolvePath() to fix bug with ~, issue #120