Handle non-ascii paths.

This updates the controller to handle non-ascii paths by storing their
URI encoded representation in the database.