OS X: fix dirname race
OS X: fix dirname race

dirname(3) on OS X is not thread safe.

Change-Id: Ic17d2d3d1359e985aefc38ab46d8ae39ee286129
Reviewed-on: http://gerrit.cloudera.org:8080/1389
Reviewed-by: Mike Percy <e07a1fd797b473a9c849e618aa2ce06d8055760b@cloudera.com>
Tested-by: Internal Jenkins

helifu/kudu,andrwng/kudu,EvilMcJerkface/kudu,EvilMcJerkface/kudu,EvilMcJerkface/kudu,andrwng/kudu,EvilMcJerkface/kudu,helifu/kudu,helifu/kudu,EvilMcJerkface/kudu,cloudera/kudu,cloudera/kudu,InspurUSA/kudu,cloudera/kudu,InspurUSA/kudu,andrwng/kudu,InspurUSA/kudu,andrwng/kudu,InspurUSA/kudu,helifu/kudu,InspurUSA/kudu,andrwng/kudu,InspurUSA/kudu,InspurUSA/kudu,helifu/kudu,EvilMcJerkface/kudu,cloudera/kudu,cloudera/kudu,helifu/kudu,andrwng/kudu,helifu/kudu,cloudera/kudu,cloudera/kudu,helifu/kudu,andrwng/kudu,InspurUSA/kudu,EvilMcJerkface/kudu,andrwng/kudu,InspurUSA/kudu,andrwng/kudu,helifu/kudu,cloudera/kudu,EvilMcJerkface/kudu,cloudera/kudu,EvilMcJerkface/kudu