private static File[] getScriptFiles(File directory) {
return directory.listFiles(new FilenameFilter() {
public boolean accept(File dir, String name) {
int indexOfDot = name.indexOf('.');
// Ignore files w/o a dot, or with dot as first or last char.
if (indexOfDot < 1 || indexOfDot == (name.length() - 1)) {
return false;
} else {
return true;
}