A pervert who filmed men using public toilets in Darlington Railway Station and shopping centres has been locked up for breaching the terms of a court order.