Add swap files and .DS_Store to .gitignore
Remove .DS_Store
Adapt functions to return errors instead of printing to console

* Tests may now fail, but that's because they were incorrectly
succeeding before
Add missing handler for test http muxer