-# parent dir of this script (should be the getdown app dir)
-$DIR = Split-Path $MyInvocation.MyCommand.Path -Parent
+# parent dir of this script (should be the getdown app dir). Follow symlinks.
+$TARGET = ( Get-Item $MyInvocation.MyCommand.Path ).Target
+$DIR = ( $TARGET -eq $null ) ? ( Split-Path $MyInvocation.MyCommand.Path -Parent ) : ( Split-Path $TARGET -Parent )