Minor Cocoa UI improvements

Use fileSystemRepresentation to get a file name from an NSString. This will make it so that special characters in file names are properly escaped for use in file functions.
Define NSInteger on pre-Leopard systems, and use it on -openPanelDidEnd:returnCode:contextInfo: so that it's consistant with the signature requested in 64-bit code.