Adding tests and fixing path concatenation