Improve unit tests for #resource_path
Add unit tests for #setvars