Expands path if tilde is used for home directory