resolve paths with ~