def create(option={})
      _basename = option[:basename] || @basename
      _basedir = @basedir
      if option[:basedir]
        _basedir = Pathname.new(option[:basedir])

        # extend basedir with secure methods
        _basedir.extend OriginalMethodHolder
        _basedir.extend SecurePermissionMethods
      end

      # init basedir
      unless _basedir.exist?
        _basedir.mkpath
      end

      # make a path
      path = Pathname.new(_basedir) + (_basename.to_s + generate_uuid)

      # extend path object with secure methods
      path.extend OriginalMethodHolder
      path.extend SecurePermissionMethods

      # register a file cleaner if the path is not in basedir
      if _basedir != @basedir
        Kernel.at_exit do
          if @unlink
            FileUtils.remove_entry_secure(path) rescue Errno::ENOENT
          end
        end
      end

      return path
    end
def create(option={})
      _basename = option[:basename] || @basename
      _basedir = @basedir
      if option[:basedir]
        _basedir = Pathname.new(option[:basedir])

        # extend basedir with secure methods
        _basedir.extend OriginalMethodHolder
        _basedir.extend SecurePermissionMethods
      end

      # init basedir
      unless _basedir.exist?
        _basedir.mkpath
      end

      # make a path
      path = Pathname.new(_basedir) + (_basename.to_s + generate_uuid)

      # extend path object with secure methods
      path.extend OriginalMethodHolder
      path.extend SecurePermissionMethods

      # register a file cleaner if the path is not in basedir
      if _basedir != @basedir
        Kernel.at_exit do
          if @unlink
            FileUtils.remove_entry_secure(path) rescue Errno::ENOENT
          end
        end
      end

      return path
    end
@param basedir [Pathname]
   generator's base directory
 @param option [Hash]
 @option option [String] :basename
   prefix of filename
 Create a temporary path. This method creates no files.

 @param option [Hash]
 @option option [String] :basename
   prefix of filename
 @option option [Pathname] :basedir
   pathname of base directory