Adding fixes per Michael's suggestions. Cleaned up qio_get_chunk, and moved qio_get_fs_type above it (since we are now using it in the qio_get_chunk function