build-image: use the full path to losetup

Sync the filesystem and use the full losetup path to make the loop
device detach more reliable.

Signed-off-by: Angus Ainslie (Purism) <angus@akkea.ca>
1 job for master
in 17 seconds, using 0.0 compute credits, and was queued for 1 second