changed handling of swap file by reserving a file for swap

added field to indicate readonly swap files