Fixed get_segments.sql to also get attachments
Added attachments to Segment.getAll and associated test