Code fixes to reduce warnings.
Bug fixes: Error check for unusual POSTs; Length calculation for animated files
Merge pull request #106 from ernstchan/bugfixes

Code fixes to reduce warnings.