It's 2014. We can use C99 with GNU extensions by now.
ignore temp files
fix undefined mkdir
fix strdup cast
add missing declaration for string_wash
fix confusing boolean op, replace by if(...)
add missing overflow check
drop privileges after socket creation