general script overhaul, improved robustness
Merge branch 'master' of https://github.com/kevlar1818/pacron