title: Is it possible to have my gem write to it's root gem directory?
body: <p>I'm trying to improve my gem's favorites feature by writing to a file included in the gem. My current version works but it requires that the user have the created file in there current working directory for it to work. </p>
  
  <p>I'm currently using <code>FileUtils</code> to write the file but have no clue if 1. this is even possible thinking maybe will have permission issues and 2. if it is possible how to have the path target successfully across different platforms and envs.</p>
  
  <p>Current Code: In my executable</p>
  
  <pre><code>#creator    
  if !File.exist?('usr')
  
    FileUtils::mkdir 'usr'
  
    FileUtils::touch 'usr/favorites.txt'
  
  end
  
  
  #writer
  File.open("../ruby_doc_favorites.txt", "a"){|l| l.puts "some string"}
  </code></pre>
  
  <p>I would like something like ...</p>
  
  <pre><code>File.open("[dynamic_path_to_gem_directory]", "a"){|l| l.puts "some string"}
  </code></pre>