Avoid using "~" in paths. Fixes issue #23.