Directive tests

Added some basic directive/service testing that improves the directives.js coverage by ~80%. Overall code coverage now (barely) hits 60%.

This PR is related to #79.