formatter calls os.path.abspath before substitution, changed unittests accordingly and some minor tidying up