added strip() to remove newline characters from being put in the path when echo is used to expand '~'