improved test cov for file src repo

Improved the test coverage for the file-based source repository.
improved cov of serialization

Improved coverage of encodeConversion() and decodeConversion() functions.
fixed sha1 fromhex bug

Increased the unit test coverage of sha1. This revealed a bug where fromhex()
would not properly parse the hex string due to an offset error (a..f having
values 0..5 instead of 10..15).