Minor bug fix and add new sys variables

New variables in `sys`:

* based on `workdir`: `inputdir`, `libdir`, `masterdir`, `bindir`
* locate update and failsafe policies: `update` and `failsafe`

`libdir