Changed the code a little bit to make unit tests easier to write
Moved options initialization from link function to controller function so it can be unit tested. That's what happens when you write your code before writing your tests :)
Added rule to ignore *.log files
Added libs to support unit tests
Added tests to options initialization
Changed restrict property to "A,E"