fix for empty file bug in idbfs

Fix for bug in IDBFS for the case when it is trying to persist an empty file. Also provided enhancements to test_idbfs_sync.c to test this case, and in doing that rearranged the code in that file primarily so that the testing code could be written in C instead of javascript. That made it a little easier to test a few additional conditions as well. The new flow for that code is to always start by syncing from persistent to memory and then in the FIRST case verify that the files in question don't already exist and then create and write to them. In the !FIRST case it verifies that they do exist and contain the right data -- followed by deleting the files (which allows the FIRST case to do its testing for them not existing). This tests both file creating and deletion. I was worried about breaking the build machines which might already have the files from previous runs when the test code created and left the files, so I also changed the name of the main IDBFS directory from 'working' to 'working1'