Added tests and fix for image dimensions issue. This closes #171.
Merge pull request #52 from colefichter/issue_171_img_width_and_height

Added tests and fix for image dimensions issue. This closes #51.