The issue was with the path in which my Sublime Text is installed - notice the ž character in my surname.
So, after a lot of searching I found out the solution here, and as stated there it seems to be the error within the exec.py
file, which can be found in your Sublime Packages directory (for example: C:\Users\Nikola Brežnjak\AppData\Roaming\Sublime Text 2\Packages\Default
). You have to change the line 45 from:
proc_env[k] = os.path.expandvars(v).encode(sys.getfilesystemencoding())
to:
proc_env[k] = os.path.expandvars(v.decode(sys.getfilesystemencoding())).encode(sys.getfilesystemencoding())
After this you have to save the file, and the plugin will reload automatically, and then the YUI compressor plugin will work flawlessly.