Fix windows tagged builds

The windows tagged builds currently fail some tests since the
winpty-agent.exe is inside the release directory instead of the debug
directory with tagged builds.
diff --git a/ci/script.sh b/ci/script.sh
index 6ab9e11..4dfc432 100755
--- a/ci/script.sh
+++ b/ci/script.sh
@@ -20,8 +20,13 @@
 
 # Test the winpty subcrate
 if [ "$TRAVIS_OS_NAME" == "windows" ]; then
-    cp ./target/debug/winpty-agent.exe ./target/debug/deps && \
-        cargo test -p winpty || error=true
+    if [ -n "$TRAVIS_TAG" ]; then
+        mkdir -p "./target/debug/deps"
+        cp "./target/release/winpty-agent.exe" "./target/debug/deps"
+    else
+        cp "./target/debug/winpty-agent.exe" "./target/debug/deps"
+    fi
+    cargo test -p winpty || error=true
 fi
 
 if [ $error == "true" ]; then