Fixed compatibillity with some shells
The best way to execute one command after the other until one works, is by continue to execute until you get success and then redirect stderr into /dev/null. However some Android shells is not able to redirect stderr, so we will have to use another way
Fixed some more compatibillity issues and bugs