May I suggest solving this problem with
User Mode Linux
This allows you to create a very tightly controlled
environment which you can duplicate exactly very easily
with (AFAIK) no way out of the controlled compartment. On
the outside you can easily block attempts at network
traffic, limit CPU usage, protect yourself from using too
much memory, disk space, etc. But from the inside it looks
like a normal machine..
BTW there are a number of gotchas with Safe. I have
found that interesting code (eg stuff that uses Exporter)
tends not to play well with Safe...