added more robust generated file location handling

Addresses issue #32