Fixed output file not changing with trigger commands

Since 36a8870 (pull request #4), results were not being stored if the start command was issued by a LibusbInterface trigger. This pull request fixes that. The output file is still opened and closed with start and stop commands (and now start and stop triggers as well).

(Note: This pull request is still missing the host_receiver.h file that's added in pull request #5)