The patch replaces dynamic array bounding with new
statements, makes allowance for \ as well as / as path
separator and adds emulators for two simple Unix
system routines. Note that the new code is only really
tested when the -x no-expand-external option is
specified. I have deleted any memory I allocated but
clearly there are still memory leaks in this code.