Thank you. The code looks correct. I confirmed that the pg_basebackup could relocate the tablespace directory on Windows.
I marked this patch as ready for committer.
RegardsMauMau