Most obvious answer: there's a space in your $scriptdir path.