Implement dir formatter
Fix bug with using os.path.dirname, replace with abspath