OS X:
Only return the number of actual elements in the array.
Fixing text caret issue

Everything drawn in MLI goes through the Image class, which takes the
game surface resolution into account - except for the caret in prompt
overlays, which is just drawn as a rectangle.  This fixes things by
making the caret take the screen scale into account as well.
Fixing uninitialized variable in DialogCharacter::OneTimeEmotion

leadInTime in DialogCharacter::OneTimeEmotion, if it doesn't exist in
the XML definition, never actually gets initialized to anything.  We
should initialize it to 0.  (Thanks to cabbage, who pointed this out on
the forums.)
Merge pull request #10 from MaddTheSane/backToGabu

OS X fixes and optimizations
Fixing merge

Fixing what looks like a bad merge for the OS X stuff that caused a
build break.
Fixing a crash in ShowDialogAction

The previous change to delete pDialog has an edge-case it brought to
light where we were expecting pDialog to still exist even though we're
not actually really doing anything with it.  We should make
ShowDialogAction resilient against a NULL pDialog and not crash if it's
NULL.
OS X changes:
Make SDLMain be compiled as an Objective C++ file.
Better interoperability between the C++ code and Objective C:
   The Objective C helper functions now return C++ objects, as opposed to c primitives. This also helps with memory management.
Ignore more OS X metadata, particularly files that begin with "._": those files are usually part of extended attributes on file systems that don't support them.
Fix an error when compiling on, at most, 10.9 (missing a header).
Merge branch 'BackToGabu'

Conflicts:
	.gitignore
	osx/AppFileStaging/Contents/Info.plist
	osx/ApplicationSupportBridge.h
	osx/SDLMain.mm
	src/FileFunctions.cpp