Fix create_links.sh: detect topdir

Change-Id: Ieaca1ce723aff901eef72665fb661dc5d7828439