Further improvements to wake on lan script

Modified the wake on lan script to reduce waiting time if the share comes available before the wol_wait time is expired.
wol_wait is now used to set the max time we want to wait until we stop trying.