Add and update cross-compiling scripts
Fix bug in publish_pir, store old pirVal
Update nfd_prep script