mpl.sh POSIX fixes, general enchancements