[vault] Be slightly more efficient and call less times the same functions
[vault] Initialize the correct config path

os::path::canonical() returns an empty string if the path does not
exist, but we don't want that
[vault] Fix writing to the exclude file