added a check before fs.close to see if file descriptor for destination file is
present or not
Merge pull request #12 from fusioncharts/feature/destination-file-close-check

added a check before fs.close