Script fails if .vimrc doesn't exist yet

Tried this script out on a new Ubuntu VM and it blew up until I created a .vimrc file. Worked quite well after.