So I accidentally did sudo chmod -R 775 / when I meant to do sudo chmod -R 775 ./. I quickly realized and hit Ctrl^C, but not in time to save everything. I realize this is a really stupid mistake and all that but I'm aware of that and I would just like to fix my OS now.
Anyway, this completely broke my OS (Ubuntu 12.04). Currently, several functions of the shell, including tab completion prints the error
bash: cannot create temp file for here
And running any bash command that I have tried on any file in my home (/home/$USER) folder crashes the terminal. Several other random things don't work around the OS now.