protected function filenameSafe($string, $options = array())
    {
        $options += array(
            'extensions' => array('txt', 'md'),
            'ext'        => 'txt',
        );
        $string = preg_replace('/[^a-z0-9\-\.]/', '-', strtolower($string));
        $string = preg_replace('/-{2,}/', '-', $string);

        // Add an extension if not found
        if ($options['ext'] && !preg_match('/\.[a-z]{1,5}$/', $string)) {
            $string .= '.' . trim($options['ext'], '.');
        }

        if ($string && function_exists('file_munge_filename')) {
            $string = file_munge_filename($string, implode(' ', $options['extensions']), false);
        }

        //@todo Add in the module that cleans name if it's installed
        return $string;
    }