Modified for compatibility with busybox sh

Modified the script so that it's no longer only compatible with bash, but also the busybox shell.