Some stuff

Fixes #820
Added Teleport metatable and moved doCreateTeleport to compat.lua.
Merge pull request #905 from dalkon/master

Some stuff