You could theoretically run the compiled code in its own app domain, thereby causing any Kill statements to only take down the process running the script, not your application's proces. If this process was run with zero-privileges, this might stop it doing any file I/O.
We'd have to know why you're compiling code to be able to suggest alternative approaches, however.