Added global attributes test thats writes a global attribute using the set-attributes command. also added runCommandUsingFile and did a little refactoring