Style and Ruby

- introduce constants for error messages
- single-quoted where OK
- %w for long lists
-helper method for mime type, which uses the FileMagic.open method