fix script that doesn't work if scripts/custom directory doesn't exist