script now receives input and output file as arguments

Hi Duncan, I did some changes so it now accepts input and output file as arguments (output is mandatory).
These changes are required to add this script to the central monitoring machine (cmsfomon).
Please review and if you are happy with these changes, then accept them. Thanks!