In theory JS syscall layer should not need to concern itself with
he higher level `fopen` modes used by libc stdio.h. The
lower level `open` modes make more sense and are simpler here.
Unfortunatly for compatability with existing code (and tests code) we
cannot fully remove these helpers.