Ok, I've found the solution (with some help ;) ).
Just change "ps x |grep -q '[f]irefox' && firefox -remote openURL(%s, new-window) || firefox %s" by "ps x |grep -q '[f]irefox' && firefox -remote 'openURL(%s, new-window)' || firefox %s" (without the quote).
Changing "new-window" by "new-tab" is also a good idea I think.
Ok, I've found the solution (with some help ;) ).
Just change "ps x |grep -q '[f]irefox' && firefox -remote openURL(%s, new-window) || firefox %s" by "ps x |grep -q '[f]irefox' && firefox -remote 'openURL(%s, new-window)' || firefox %s" (without the quote).
Changing "new-window" by "new-tab" is also a good idea I think.