Fix problem with ~ path.