Arjen - I ran it with this command as per the magento documentation:
Why would renaming the file make any difference?
I've seen cases that there were issues with underscores and dashes. Maybe that would have been the error. Did you try the command with sudo? That will onlywork if you have admin permissions.
By thw way, I would suggest running the patch locally or on a testing environment and migrate it to your live environment when you're sure it causes no problems to your webshop.
If there had been a problem with underscores and dashes then it wouldn't have run at all. Instead it would have returned a command not found error instead of a syntax error in the script.
If it failed with a permission error - then sudo might have been the solution. But that's not what's happening.
You make a good point about running the patch on a test environment. However the script fails on a test version of the site which is lcoated on a separate sub-domain on the server.
Here's what worked for me (linux)
1 - open the .sh patch in your text editor
2 - change line endings to UNIX
3 - change encoding to UTF-8
4 - save file (sometimes I had to save & re-open - using Panic's Coda 2.5 text editor)
5 - upload to Magento root & run via sh or bash
(or whatever your file name is)