Finally managed to get it to work. Although BiG World Setup didn't show the error when running the script, after running Setup-BGT.exe myself, I ran into the error asking for the correct folder. So I closed Setup-BGT.exe's process tree, restarted BiG World Setup, continued installation, then entered D:\Baldur's Gate in the input field when the installer paused, and it worked like a charm