Fixed ~ not working; use File::HomeDir instead