Use String#capitalize instead of #capitalize!

`String#capitalize!` returns nil if no modifications were made to the
string, so if you use properly capitalized names in the URL, the names
become `nil`.

This PR changes the `capitalize!` calls to `capitalize`, which allocates an extra string every time, but it will always return the right value.