Handle error from lseek(2)

Coverity:	1238198
Fix dead code

Coverity:	1238196
Check fread(3) return values
Fix unchecked return of chdir(2)
Ensure proper read size
Build gcov if possible
Add Coverity badge
Attempt to hookup coveralls.io