Modify the second to last line of the above code to be: sudo -u $USER rmdir ~/.gvfs || sudo -u $USER rm ~/.gvfs
Modify the second to last line of the above code to be:
sudo -u $USER rmdir ~/.gvfs || sudo -u $USER rm ~/.gvfs