Support features from periodicnoise 0.12

supports the new features of periodicnoise 0.12
 * exit code remapping options
 * --grace-time parameter

@Bonko or @mlafeldt Please take a look.