Fix -Wextra Warnings

Cast size_t to long in long-size_t comparisons
Merge pull request #38 from njwhite/master

Fix -Wextra Warnings