check if keyfile exists before logging in to maas

Noticed a problem where the sudo user was expiring and the status screen
running in a loop waiting for a password input.

Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
iterate the machine properties properly

Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>