Adds testing of attachment insertion and fetching to the functional tests. Fixes bug where the connector used in the functional tests stored attachments in the wrong collection