Fixed safe_format_and_mount to work on redhat 6