Looks like you're using the docs at the top of runOnCluster.php which are out of date :(,  sorry about that.  I changed them when we talked but didn't commit.  This should look like:

    public static function run ( $db, $test = false, $verbose = false, $params ) {
        $dbname = $params['dbname'];

Also, you should wrap all of your write operations in this script with:

    if ( !$test ) {
        // Any write
    }

You'll want to use --test when you run this script to make sure you've got everything working correctly.