expand keyfile path