Added e2e tests to grunt file.
Factored out some functionality as scripts.