make ParquetFileWriter throw IOException in invalid state case
Merge pull request #367 from Parquet/ioexception

make ParquetFileWriter throw IOException in invalid state case