Settings upload fix.

This allows image upload to be used in the modal settings box.

Also fixes an issue with koi routes (Rails can't decide between koi_foo_path and foo_path depending on whether it's a Rails object.

The settings redirects just make sure we end up back in the right place.