Move decorator functions out of util into separate file
Move Exceptions from utils.py into new exceptions.py
Reorder imports, add __future__ imports and utf8 comments

The __future__ imports and utf8 comments are intended to make the code
more easily Python 3 compatible
Add @wraps annotations
Merge pull request #868 from maurizi/refactorUtils

Refactor utils