Fixed bug in write_output for write4D when files are file.pathed