Wait for response

In order to fix #5, I've added a semaphore that acts as a resource lock. The semaphore is acquired before sending a command and is not released until a non-zero length response is received. This should prevent the receiver from getting corrupted serial data.