Small performance improvement with md5_file over hash_file('md5
Unit tests and general improvements