replace filename in AST
some more transforms
add exports for prolog code