[WIP] 404 instead of 500 on inexistent paths

for tree edit, blame and commits.

This was already working for blob and tree views.

The real cause of this however, is that the current controller design is bad: `blame`, `commits` and `edit` should be different actions of a single controller.

The only reason they are not is probably because the `:id` can contain slashes which makes it harder to write DRY routes. See: http://stackoverflow.com/questions/26223317/how-to-put-a-member-of-a-routing-resource-outside-of-its-parent-namespace . But I'd rather have non DRY routes instead of non DRY controllers.