Added fallback in case atomic file move is not supported (thanks petern)