Corrections to relative root detection

Proofer now supports iterating over single files, so make sure we’re
using the file’s dirname if it’s not actually a directory
Semantic cleanup