Fixing mysql shell_exec bug in OSx. Improving js checks