Multiple fixes

https://github.com/WindowsAzure/azure-sdk-tools-xplat/issues/699
https://github.com/WindowsAzure/azure-sdk-tools-xplat/issues/700
https://github.com/WindowsAzure/azure-sdk-tools-xplat/issues/695
https://github.com/WindowsAzure/azure-sdk-tools-xplat/issues/696
https://github.com/WindowsAzure/azure-sdk-tools-xplat/issues/701