Test author string and extract email validation

I wrote this while trying to solve a problem reading the author details from git config. Hopefully it improves code coverage and readability.