Use codecs module to open files

This prevent possible errors on open files which contains non-ASCII
characters.
Explicitly add `werkzeug` to requirements

Flask is already depends from it, but the explicit is better than implicit.
Explicitly specify min `pytest` version

The `yield` fixture has been introduced only in `pytest` verion 2.4.
Update verion number