General bug sweep.

So much neglect. A general bug sweep has been done to fix more problems
with new installs, upgrades, and some minor security issues with hidden
gallery and download folders.