move getDocumentsDirectory to application namespace, Mac changes