Update gems
Fix possible character encoding issues on some systems
Send Access-Control headers for 404 responses