Fix .gitignore rules and add missing test files (#282)