private void createDirectory(final File dir) {
        if (dir != null && !dir.exists()) {
            dir.mkdirs();
        }
    }
Create a request writer that writes to the given file

@param file
@param formatVersion
app/src/main/java/com/github/pockethub/android/RequestWriter.java