It's using networksetup, not /Sys/Lib/.../airport to actually set it, right?
I noticed it refers to the network as Open in the Preferred Networks list, whereas on at least 10.6+ "networksetup -setairportnetwork en0 SSID PSK" works from any user and connects immediately as long as airport is active/you know the hdwe port/and it's powered on.