Fix tests, fix doc build, fix one bug

Not all test cases would be possible to bring in sync with current implementation with just a reasonable effort - see uses of QEXPECT_FAIL
This is to allow execution of tests installed on target - the original assumption was in conflict with the fact that temporary files are created under CWD (must be RW location -> cannot be /opt/tests/... as originally assumed here)