Fixed bug on Linux that caused the core to fail when output files with t...

...he same chunk dimension as dataset dimesion got written.