#347. Fixed tmppath with schemas

Patch with fix and test