Tidied up indentation, fixed permissions of test scripts