Ensured the path emitted is correct and added test for absolute paths