Re-implemented some Script functions. Added support for arbitrary plugin paths.