Add better src resolution

if dest is not symetrical with src, the srcPath is
incorrect. The path should be diffed with the dest
and corrected.
Merge branch 'pr/1037' into rc-0.36

Conflicts:
	lib/middleware.js
History updated