Take codebase in consideration when doing a 'copy' or 'export' checkout.
Fix platform dependant path building.
Add test, and fix the code ;)
Merge pull request #1291 from benallard/patch-3

master/svn: Take codebase in consideration when doing a 'copy' or 'export' checkout.