Add cwd as parameter to Exception.format_entry