Replace exec() calls with PHP native functions where possible.