avoid using chdir fixing issue with multiple relative path targets