Allow to specify a directory to serialize to

Makes adhering to https://developer.apple.com/icloud/documentation/data-storage/ easier.