Fixed memory leak in redis-monitor and added build script