new function to return root installation path

Changes:

- created a function that returns mexopencv root path
- changed various files to use it instead of relative paths
- use `tempname` in some tests instead of creating files in current directory