Add argument for errors.hpp to pdmgen.py, fix race

pdmgen.py is now given a "-e" argument to specify where to write
errors.hpp.

Previously it was hardcoded to 'errors.hpp', this could
hit a race where the src/test run of pdmgen.py could overwrite
the actual errors.hpp with an empty file.
That resulted in missing definitions with a compile error such as
...phosphor-dbus-monitor/1.0+gitAUTOINC+413a485715-r1/recipe-sysroot/usr/include/c++/12.1.0/type_traits:1447:38: error: invalid use of incomplete type 'struct sdbusplus::xyz::openbmc_project::Sensor::Threshold::Error::CriticalHigh'

Signed-off-by: Matt Johnston <matt@codeconstruct.com.au>
Change-Id: Ib982631e506ade18c587a3e6552e4109760758ef
3 files changed