Fixed issues around empty paths, and also made sure paths are never relative

Thanks @ashimshahi for pointing them out