Added compile_to method that with single .compile() can produce multiple target files.

This is my take on issues/568.
What do you think?
Okay, let's give this a try. Please take a look at updated diff.