Add perl critic

Adds perl critic to author tests and fixes anything with severity 3 or above.