Allow having prefix specific layouts.

Refs #3907
Merge pull request #3935 from ADmad/3.0-prefix-template-path

Allow having prefix specific layouts.
The `.` character is a valid part of an email address.

Refs #3982
Fix relative path resolution in View.

Relative paths in view file names where handled very poorly before when
subdirectories were involved. This was not very important in 2.x but is
more important for 3.x as we have Cells and relative paths should work
properly there.

Refs #3945
Enforce that relative paths are contained within the template paths.

If user input was used to generate a view path, they could use
a relative path and try to escape the template path directories. Check
the paths if they look like bad things are going to happen.
Check for directory traversal in layout paths.

Refs #3945