Fixed bug in directory level test querying

Fixed bug where aggregation for directory level test
querying was overwritten by generic querying.
Functionized buildID and git hash results retrieval
Reformed error template args, program catches absense of coverage data

If there exists no coverage data in the database, the report page
expresses this instead of crashing.