Make sure SCRIPT_DIR is a non-unicode string, which happens when running from the interpreter.