How do I programmatically and reliably get the AirPort's interface name?
If you need to support old versions of OS X, the Wi-Fi network service was called Airport in 10.6 and earlier.

networksetup -listallhardwareports | awk '/^Hardware Port: (Wi-Fi|AirPort)$/{getline;print $2}'

You could also use -listnetworkserviceorder:

networksetup -listnetworkserviceorder | sed -En 's/^\(Hardware Port: (Wi-Fi|AirPort), Device: (en.)\)$/\2/p'

Or read /Library/Preferences/SystemConfiguration/NetworkInterfaces.plist:

ruby -e 'require "plist";puts Plist::parse_xml("/Library/Preferences/SystemConfiguration/NetworkInterfaces.plist")["Interfaces"].select{|i|i["SCNetworkInterfaceType"]=="IEEE80211"}[0]["BSD Name"]'