Fix handling path's started with '~/' in environment variable PATH.