Fixed runtime path bug. Added some tests.