Refactored error handling; not quite finished encoding errors though.
Updated error handling code in the URI percent decoding function.
Merge pull request #27 from glynos/issue_23

Issue 23