Xamarin Forms: grave um arquivo no armazenamento interno do dispositivo Android

Estou desenvolvendo um aplicativo de plataforma cruzada usando o projeto Xamarin Forms PCL. Nisto, preciso escrever um arquivo no armazenamento interno do Android para poder acessá-lo. Eu dei permissões de gravação para armazenamento externo, mas quando tento gravar o arquivo, ele diz que o acesso é negado.

Aqui está o que eu tentei:

Java.IO.File DataDirectoryPath = Android.OS.Environment.DataDirectory;
string dirPath = DataDirectoryPath.AbsolutePath + "/MyFolder";
bool exists = Directory.Exists(dirPath);
string filepath = dirPath + "/test.txt";
if (!exists)
{
    Directory.CreateDirectory(dirPath);
    if (!File.Exists(filepath))
    {
        File.Create(filepath).Dispose();
        using (TextWriter tw = new StreamWriter(filepath))
        {
            tw.WriteLine("The very first line!");
            tw.Close();
        }
    }
}