Many more tests

- Small bug fix on throwing exceptions
- .gitattributes to exclude some dirs when archiving
- Updated documentation