resolve source and target to cwd