Add tests for ureport & attachment processing, fix minor issues found

Depends on #208.

Closes #209.