Add possible trailing whitespace and missing -D argument

Added test for trailing space case
Merge pull request #17 from hermanschaaf/master

Add possibility of trailing whitespace and add missing -d argument