Merge pull request #966 from dgough/next

Renamed FileSystem::dirname() to getDirectoryName
Minor fixes.
- Fixes problem in encoder with generation materials that have names with non-alphanumeric characters in them.
- Model::getMaterial(int) now returns NULL instead of asserting if material index is not valid.
Merge pull request #972 from sgrenier/next

Minor fixes.
Fixed bug in FileSystem::getDirectoryName()