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

This should close #51 and includes tests for images both with and without a style block.