Revert "Revert "Add dex file writer to dexlayout tool.""

This reverts commit fd1a6c2a08ca3e2476b7424b9b0fa58e73b29e87.

Fixed output being clobbered during DexLayoutTest.DexFileOutput.
Option added to put dex output file in scratch directory.

Bug: 29921113
Test: mm test-art-host-gtest-dexlayout_test

Change-Id: I9e6b139cf06aaa39c83ad1e74329db266464a8e4
diff --git a/dexlayout/dexlayout.h b/dexlayout/dexlayout.h
index c4892d2..c01eb79 100644
--- a/dexlayout/dexlayout.h
+++ b/dexlayout/dexlayout.h
@@ -43,7 +43,6 @@
   bool disassemble_;
   bool exports_only_;
   bool ignore_bad_checksum_;
-  bool output_dex_files_;
   bool show_annotations_;
   bool show_cfg_;
   bool show_file_headers_;
@@ -51,6 +50,7 @@
   bool verbose_;
   bool visualize_pattern_;
   OutputFormat output_format_;
+  const char* output_dex_directory_;
   const char* output_file_name_;
   const char* profile_file_name_;
 };