Create directory for code dumps if it does not exist
Fix dumping generated code for device backends