viewScriptExists: check all paths

viewScriptExists should search all the script paths instead of only the first.