Imporved get_scripts function

Previous version would hide a directory having a name of another
directory as prefix (e.g. 'bla' would hide 'bla_bla')