replaced bad system() calls with posix API
Authored by: lilyco 2011-04-07
Parent: [r633]
Child: [r635]