Added support for paths in non-Windows systems that start with tilde(~).