Fixed build on VPATH environment

* Test suite now uses C code allowing to use VPATH
  building on a custom build directory. This keeps
  source tree untouched.