Automated tests

Sets up guard with rspec, better error logging and email deliveries only open in the browser.