Fix routing error and handle no valid characters in path special case

Fixed the shortener_translate route to point to an existing action. Also handled the case where match returns nil, avoiding call for [1] on nil.