Standardise the syntax test

Including testing various directories.
Partial perltidy all the code.