use -fPIC to build on Linux
fix test: create temp directory recursively
add test directory to .gitignore