Pull Request for Issue949: AMScanActionController file writing cleanup

Implementation for moving a lot of clean up handling to AMScanActionController and out of the subclasses.
 @epengr , I did your XES scan controller and it builds but obviously I can't test it. Could you test this branch? If not, let me know after it's been pulled into master if you're having problems.