Expand tildes in key path before testing for existence

Unfortunately, while Ruby will implicitly expand a tilde in a file path in
most places, it doesn't actually do that for file existence tests.

This manually expands the path before performing the test, which makes the key
default detection actually work as expected.

Signed-off-by: Daniel Pittman <daniel@rimspace.net>