fn read_attachment(path: &Path, cap: u64) -> Result<Vec<u8>, VaultToolError>
Read an attachment source: the size is checked from metadata before the read, and again after it, because the file can grow between the two.