Use filename for logging during conversion (if supplied).

Closes #2
Slightly refactor test setup.