workaround realpath implementation on OS X
wait for child process complete