Some stuff

Fixes #820
Added Teleport metatable and moved doCreateTeleport to compat.lua.