Small fix, make it possible to run and pass all tests directly within Intellij

Depending on the build system's working directory may cause different behavior on different IDEs, for example, Intellij is not using the module directory as the working directory, so use module directory based relative path to fetch a module file is not working on Intellij.

Fix this by creating temp files from resource data.