title: Writing hidden file .nomedia fails on internal storage
body: <p>I want to create .nomedia file in the internal cache directory where I will store images and tried the following..</p>
  
  <pre><code>File dir = getCacheDir();
  File output = new File(dir, ".nomedia");
  boolean fileCreated = output.createNewFile();
  </code></pre>
  
  <p>When I try this fileCreated is false and the file doesn't get created.
  If I used nomedia without a dot the file gets created but this is no use as the MediaScanner is looking if the .nomedia file exists.</p>
  
  <p>I also tried this with a FileOutputStream and to write data in the file in case it was because I was only created an empty file but this doesn't work either.</p>
  
  <p>Anyone have an idea why this could be failing?</p>