Compile fix on FileUtils::getDirectory().

This commit fixes the compiler error in FileUtills::getDirectory() when building FileUtills.cpp.

This commit also corrects some code formatting issues in
FileUtills::getDirectory() as well.
Merge branch 'master' into encryption-utils

Merge compile fix on FileUtills.cpp from master.