Design and construction of the SPIRIT TPC