Use virtual file instead of temporary file for tests

see discussion in https://github.com/lampepfl/dotty/pull/31
@odersky and @sjrd Please review