Test descriptor

I thought I'd commit some tests for the descriptor class, as much of its work was not covered.  These tests were mostly built by continually calling "to_file" with the fakes and marking the end result.  

The only change I made to the original class was to pull the dependency on the application instance to the constructor, as I think the dependency is better expressed as early in the class as possible.