Access Denied when I try to flush cache or change theme
I have no idea why, but I disabled clean-urls and reenabled it and now I can flush cache and switch themes without access denied.

I had installed the Boost module which also involved putting some stuff in the .htaccess and turning on clean urls (although I was using it anyway). 

This problem took me about 4 hours to solve and was completely unintuitive.