Fix formatting of negative numbers (fixes #49).
Improve phpunit code coverage.