add '~' to unixpath

The '~' character is valid in unix filenames.