Real-time detection system for ultra-short THz pulses using a high-T$_c$ thin YBa$_2$Cu$_3$O$_{7-x}$-film detector