Made test and fix for trailing whitespace problem.

Fixes #23
Merge pull request #35 from paulfurley/trailing-whitespace

Made test and fix for trailing whitespace problem.