scripts: Improve script file parsing

The script lookup step is now more robust, more resilient against typos
in script names.

Story-Id: SF-99
Change-Id: 07da49944e