mv email.sql to the right place
tests added using phpunit
fix support for uri like ~joey